<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<script src="../jQuery-2.1.4.min.js"></script>
		<title></title>
	</head>
	<body>
		<!--
			data-toggle="tooltip" data-placement="right" title="刷新时间设置"
		-->
	<ul class="box-ul">
		<li id="1">
		<span class="chart-time" >
			<input class="time-input" 
					type="number" value="5" 
					placeholder="单位：分钟" 
					style="display: none;"
					onblur="zz(this)"
					/>
			<span class="time-text" onclick="bb(this);">xx</span>
		</span>
	</li>
	<li id="2">
		<span class="chart-time" >
			<input class="time-input" 
					type="number" value="5" 
					placeholder="单位：分钟" 
					style="display: none;"
					onblur="zz(this)"
					/>
			<span class="time-text" onclick="bb(this);">xx</span>
		</span>
	</li>
	</ul>
	<script>
	var endtimes=[];	
	
	initTime()
function initTime(){
	$(".box-ul li").each(function(){
		var id = $(this).attr('id');
		var val = $(this).find(".time-input").val();
		val = val*60*1000;
		endtimes[id] = val;
	});
	setInterval("refer()",1000);
	
}
function refer(){
	
	$(".box-ul li").each(function(){
		var id = $(this).attr('id');
		console.log(id)
//		endtimes[id] = endtimes[id] -1000;
//		if (endtimes[id]<=0) {
//			document.getElementById("day"+id).innerHTML = "";
//			document.getElementById("hou"+id).innerHTML = "";
//		} else {
////			timechange(endtimes[id],id);
//		}
	});
		//window.setTimeout("refer()",1000);
	}	
	

function ff (){
	$(".chart-time-text")
}
function aa(){
	console.log("aaaaaaa")
	$("chart-time input").css("display","none");
	$("chart-time chart-time-text").css("display","inline-block");
}

function zz(v){
	console.log(222)
	$(v).toggle();
}

function bb(v){
	$(v).prev().toggle();
//	$(".chart-time input").toggle();

	if($(v).prev().css("display")=="none"){
		console.log($(".chart-time input").val())
	}
}
		

		
		
		
		
		
		
		
		
	</script>
	</body>
</html>
